package metier;

public class Personne {

	private	int	id_personne	= -1;
	private	String nom		= "";
	private	String prenom	= "";
	private String adresse	= "";
	private String pseudo = "";
	private String mdp = "";
	private String email = "";
	private String telephone = "";
	private boolean admin = false;
	Region region;

	
	
	public Personne(){
	}
	
	public Personne(int code, String nom, String prenom, String adresse,
			String pseudo, String mdp, Region region, String email,
			String telephone,boolean admin) {
		super();
		this.id_personne = code;
		this.nom = nom;
		this.prenom = prenom;
		this.adresse = adresse;
		this.pseudo = pseudo;
		this.mdp = mdp;
		this.region = region;
		this.email = email;
		this.telephone = telephone;
		this.admin = admin;
		
	}

	public Personne(String nom, String prenom, String adresse, String pseudo,
			String mdp, Region region, String email, String telephone,boolean admin) {
		super();
		this.nom = nom;
		this.prenom = prenom;
		this.adresse = adresse;
		this.pseudo = pseudo;
		this.mdp = mdp;
		this.region = region;
		this.email = email;
		this.telephone = telephone;
		this.admin = admin;
	}

	public boolean isAdmin() {
		return admin;
	}

	public void setAdmin(boolean admin) {
		this.admin = admin;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getAdresse() {
		return adresse;
	}

	public void setAdresse(String adresse) {
		this.adresse = adresse;
	}

	public String getPseudo() {
		return pseudo;
	}

	public void setPseudo(String pseudo) {
		this.pseudo = pseudo;
	}

	public String getMdp() {
		return mdp;
	}

	public void setMdp(String mdp) {
		this.mdp = mdp;
	}

	public Region getRegion() {
		return region;
	}

	public void setRegion(Region region) {
		this.region = region;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	
	public boolean	equals(Object o)
	{
		if (o instanceof Personne) {
			Personne p = (Personne) o;
			return this.id_personne == p.id_personne;
		}
		else
			return false;
	}

	@Override
	public String toString() {
		return "["+id_personne+";"+nom+";"+prenom+";"+adresse+";"+pseudo+";"+mdp+";"+region+";"+email+";"+telephone+"]";
	}

	public int getId_personne() {
		return id_personne;
	}

	public void setId_personne(int id_personne) {
		this.id_personne = id_personne;
	}

	
	
	
	
}
